1. Field of the Invention
The present invention is generally in the field of signal coding. In particular, the present invention is in the field of speech/signal coding and specifically in the application where ITU G.711 A-law or μ-law codec is involved.
2. Background Art
ITU G.711
G.711 is an old ITU speech and audio codec standard which has been widely used in communication systems. G.711 is PCM based codec. Every signal sample is encoded with 8 bits. If the sampling rate is 8 kHz, the resulting codec bit rate is 64 kb/sec. Two encoding laws are recommended and these are commonly referred to as the A-law and the μ-law. The definition of these laws is given in Tables published in the ITU recommendation. When using the μ-law in networks where suppression of the all 0 character signal is required, the character signal corresponding to negative input values between decision values numbers 127 and 128 should be 00000010 and the value at the decoder output is −7519. The corresponding decoder output value number is 125. The number of quantized values results from the encoding law. Digital paths between countries which have adopted different encoding laws should carry signals encoded in accordance with the A-law. Where both countries have adopted the same law, that law should be used on digital paths between them. Any necessary conversion will be done by the countries using the μ-law. The rules for conversion are given in the ITU publication. Every “decision value” and “quantized value” of the A (resp. μ) law should be associated with a “uniform PCM value”. (For a definition of “decision value” and “quantized value”, see ITU Recommendation G.701 and in particular FIG. 2/G.701). This requires the application of a 13 (14) bit uniform PCM code. The mapping from A-law PCM, and μ-law PCM, respectively, to the uniform code is given in the ITU publication. The conversion to A-law or μ-law values from uniform PCM values corresponding to the decision values, is left to the individual equipment specification. One option is described in ITU Recommendation G.721, §4.2.8 subblock COMPRESS.
Perceptual Weighting Filter
Perceptual weighting filtering is a technology which explores human ear masking effect to improve perceptual quality of signal coding or speech coding. This technology has been widely used in many standards during recent decades. One typical application of perceptual weighting is shown in FIG. 1; the examples of this application can be found in G.729, G.723.1 and many other standards. In FIG. 1, 101 is unquantized original signal which is the input to encoder and also the reference signal for the quantization error estimation. 102 is the output bitstream from encoder, which needs to be transmitted to decoder. The decoder outputs quantized signal (or decoded signal) 103, which is used to estimate quantization error 104 in encoder. Then, the direct error 104 passes through weighting filter to get weighted error 105. Instead of minimizing the direct error, the weighted error 105 is minimized so that the spectrum shape of the direct error fits human ear marking effect. Because decoder is placed in encoder, the whole system is often called closed-loop approach or analysis-by-synthesis method, which mathematically minimizes the following error energy,
                                          Min            ⁢                          {                              E                w                            }                                =                      Min            ⁢                          {                                                ∑                  n                                ⁢                                                                                                                        [                                                                              s                            ⁡                                                          (                              n                              )                                                                                -                                                                                    s                              ^                                                        ⁡                                                          (                              n                              )                                                                                                      ]                                            *                                                                        h                          W                                                ⁡                                                  (                          n                          )                                                                                                                          2                                            }                                      ,                            (        1        )            where * means mathematical convolution; hw(n) is the impulsive response of weighting filter W(z). (1) can be re-written in another form:
                                          Min            ⁢                          {                              E                w                            }                                =                      Min            ⁢                          {                                                ∑                  n                                ⁢                                                                                                                                                  [                                                                                    s                              ⁡                                                              (                                n                                )                                                                                      -                                                                                          s                                ^                                                            ⁡                                                              (                                n                                )                                                                                                              ]                                                *                                                                              h                            F                                                    ⁡                                                      (                            n                            )                                                                                              +                                              s                        ⁡                                                  (                          n                          )                                                                    -                                                                        s                          ^                                                ⁡                                                  (                          n                          )                                                                                                                          2                                            }                                      ,                            (        2        )            
where hF(n) is the impulsive response of the modified weighting filter F(z)=W(z)−1. The equation (2) can be expressed in the diagram shown in FIG. 2; 201 is original unquantized signal; 205 is quantized signal; 206 is bitstream which should be transmitted to decoder; 204 is direct error; 203 is weighted error also called feedback noise or noise feedback; 202 is unquantized signal with added feedback noise. The principle shown in FIG. 2 is basically equivalent to the one in FIG. 1.
The above presented weighting filter is used in encoder side only. This paragraph will describe the usage of weighting filter in both encoder and decoder; such an example can be seen in ITU G.729.1 and other standards. FIG. 3 gives the typical example of employing weighting filter in both encoder and decoder. 301 is unquantized signal which goes through a weighting filter W(z) to get unquantized weighted signal 302; the couple of quantizer (encoder) and de-quantizer (decoder) works on the weighted signal to obtain quantized weighted signal 304; bitstream 303 from encoder is sent to decoder; the minimization of the error 305 is based on the weighted domain. FIG. 4 shows the decoder which corresponds to the encoder explained in FIG. 3. Bistream 401 from transmission channel is the input to the decoder (de-quantizer) which first reproduces the quantized weighted signal 402; then the inverse weighting filter W(z)−1 is applied to change the weighted signal 402 back to normal signal domain 403; a post-processor is often followed to improve the final signal output 404.
All above mentioned weighting filters are normally estimated on unquantized original signal in encoder or quantized original signal in decoder.
This invention proposes a way to control weighting filter parameters; in particular, the invention is used to improve the quantizer (encoder) and/or de-quantizer (decoder), which is related to ITU standard G.711.